package com.video_study.service.serviceImpl;

import com.video_study.dao.VideoMapper;
import com.video_study.dto.VideoDto;
import com.video_study.result.ResponseData;
import com.video_study.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class VideoServiceImpl implements VideoService {
    @Autowired
    VideoMapper videoMapper;
    @Override
    public ResponseData getVideosByCourseId(String id) {
        List<VideoDto> videoDtos = videoMapper.getVideosByCourseId(id);
        return new ResponseData(videoDtos);
    }
}
